/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.animation.transformations;

import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.api.Generator;
import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.helpergenerators.WithBorderGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.transformations.ChangeBorderWidth;

/**
 *
 * @author Admin
 */
public class ChangeBorderWidthGenerator implements Generator{

    @Override
    public boolean canGenerate(Object c) {
        if(c instanceof ChangeBorderWidth)
            return true;
        else return false;
    }

    @Override
    public void generate(StringBuilder sb, Object o,int recursionLevel,Object original) {
        ChangeBorderWidth w = (ChangeBorderWidth)o;
        sb.append(WithBorderGenerator.borderWidthVarName+recursionLevel+" => "
                +w.getDestinedWidth()+" tween Interpolator."+
                w.getInterpolation().getName()+",\n");
    }

}
